package com.terrynoya.fight.data.parser.sff
{
	import flash.utils.ByteArray;

	/**
	 * 
	 * @author terrynoya
	 */
	public class SFFHeader
	{
		/**
		 * 
		 * @default 
		 */
		public static const CHAR_SET:String = "utf-8";
		
		/**
		 * 
		 * @default 
		 */
		public var offsetFirstNode:int;
		/**
		 * Spite数量
		 * @default 
		 */
		public var totalNumSprites:int;
		/**
		 * 第一个调色盘的偏移位置
		 * @default 
		 */
		public var offsetFirstPalette:int;
		/**
		 * 调色盘数量
		 * @default 
		 */
		public var totalNumPallets:int;
		/**
		 * 
		 * @default 
		 */
		public var ldataOffset:int;
		/**
		 * 
		 * @default 
		 */
		public var ldataLen:int;
		/**
		 * 
		 * @default 
		 */
		public var tdataOffset:int;
		/**
		 * 
		 * @default 
		 */
		public var tdataLen:int;
		
		/**
		 * 
		 * @param bytes
		 * @param offset
		 */
		public function SFFHeader(bytes:ByteArray,offset:int)
		{
			bytes.position = offset;
			offsetFirstNode = bytes.readUnsignedInt();
			totalNumSprites = bytes.readUnsignedInt();
			offsetFirstPalette = bytes.readUnsignedInt();
			totalNumPallets = bytes.readUnsignedInt();
			ldataOffset = bytes.readUnsignedInt();
			ldataLen = bytes.readUnsignedInt();
			tdataOffset = bytes.readUnsignedInt();
			tdataLen = bytes.readUnsignedInt();
		}
	}
}